/**
 * 图片预览弹窗
 * @author xiaoxujs
 */
import {
    Image
} from "antd";
import { FC } from "react";
import { ImageBpx } from "../Rukuangpingzheng/style";

const ImageModule: FC<{
    visible: boolean,
    src?: string,
    handleCallback: () => void;
}> = ({
    visible,
    src,
    handleCallback
}) => {
        return <ImageBpx>
            <Image

                width={200}
                style={{ display: 'none' }}
                src={src}
                preview={{
                    visible,
                    src: src,
                    getContainer: false,
                    onVisibleChange: (value) => {
                        handleCallback();
                    },
                }}
            />
        </ImageBpx>
    }

export default ImageModule;